<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="步骤1：开放GaussDB(DWS)备份恢复所需端口">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001792502686.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
  <meta name="DC.Publisher" content="20240320">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="ZH-CN_TOPIC_0000001792502774">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>步骤1：开放GaussDB(DWS)备份恢复所需端口</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="ZH-CN_TOPIC_0000001792502774"></a><a name="ZH-CN_TOPIC_0000001792502774"></a>
  <h1 class="topictitle1">步骤1：开放GaussDB(DWS)备份恢复所需端口</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle"><span style="color:#5B9BD5;">操作步骤</span></h4>
    <ol>
     <li><span>登录GaussDB(DWS)节点。</span></li>
     <li><span>拷贝configure_firewall_port.sh脚本到GaussDB(DWS)节点的root目录。</span></li>
     <li><span>执行以下命令备份iptables到临时文件，以iptables.test为例（以下备份方式适用于打开iptables的场景）。</span><p></p><pre class="screen">iptables-save &gt; iptables.test</pre> <p></p></li>
     <li id="ZH-CN_TOPIC_0000001792502774__li10155122918216"><a name="ZH-CN_TOPIC_0000001792502774__li10155122918216"></a><a name="li10155122918216"></a><span>执行以下命令开放GaussDB(DWS)备份必需的端口（必需端口为：55000:55050、9010:9050、 15000:15050、17000、59520:59539）。</span><p></p><pre class="screen">sh configure_firewall_port.sh add <em>192.168.0.0/16</em></pre>
      <div class="note">
       <img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span>
       <div class="notebody">
        <ul>
         <li>“192.168.0.0/16”为GaussDB(DWS)业务网络平面和<span>本产品</span>备份网络平面的网段，如果两个平面的网段不一致，需要对两个平面的网段都执行此脚本。</li>
         <li>如果需要开放其他端口，需要执行以下命令添加（示例中“30600”、“59600:59610”为需要添加的端口）。</li>
        </ul>
        <pre class="screen">sh configure_firewall_port.sh add <em>192.168.0.0/16</em> <em>30600</em> <em>59600:59610</em></pre>
       </div>
      </div> <p></p></li>
     <li><span>如果<a href="#ZH-CN_TOPIC_0000001792502774__li10155122918216">4</a>失败，或未达到预期，执行以下命令恢复iptables规则并保存配置（以下恢复方式适用于打开iptables的场景）。</span><p></p><pre class="screen">iptables-restore &lt; iptables.test
service iptables save</pre> <p></p></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="zh-cn_topic_0000001792502686.html">备份GaussDB(DWS)</a>
    </div>
   </div>
  </div>
 </body>
</html>